Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Set up golang context when initiating controller manager #2339

Merged
merged 1 commit into from
Sep 13, 2023

Conversation

zhanggbj
Copy link
Contributor

@zhanggbj zhanggbj commented Sep 8, 2023

What this PR does / why we need it:
Set up golang context when initiating controller manager and also pass it down to VSphereCluster controller.
For other controllers, will update in separate PR.
This is part of #2295.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Part of #2295

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Sep 8, 2023
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 8, 2023
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 8, 2023
@zhanggbj zhanggbj mentioned this pull request Sep 8, 2023
18 tasks
@zhanggbj zhanggbj force-pushed the refactor_ctx_init branch 2 times, most recently from 53ce118 to 46c6301 Compare September 8, 2023 07:39
@sbueringer
Copy link
Member

I'll take another look once tests are green :)

@codecov-commenter
Copy link

codecov-commenter commented Sep 8, 2023

Codecov Report

Patch coverage: 65.38% and project coverage change: +0.05% 🎉

Comparison is base (2188e96) 50.21% compared to head (62877a6) 50.27%.
Report is 19 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2339      +/-   ##
==========================================
+ Coverage   50.21%   50.27%   +0.05%     
==========================================
  Files          87       87              
  Lines        8041     8042       +1     
==========================================
+ Hits         4038     4043       +5     
+ Misses       3676     3674       -2     
+ Partials      327      325       -2     
Files Changed Coverage Δ
pkg/manager/manager.go 27.50% <0.00%> (ø)
pkg/manager/network.go 0.00% <0.00%> (ø)
pkg/manager/options.go 58.53% <ø> (ø)
controllers/vspherecluster_reconciler.go 60.57% <78.94%> (+0.08%) ⬆️
controllers/vspherecluster_controller.go 46.91% <100.00%> (ø)

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@sbueringer sbueringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few nits

controllers/vspherecluster_reconciler.go Outdated Show resolved Hide resolved
main.go Show resolved Hide resolved
test/helpers/envtest.go Outdated Show resolved Hide resolved
@zhanggbj zhanggbj force-pushed the refactor_ctx_init branch 4 times, most recently from 78226c3 to 9d02623 Compare September 12, 2023 06:31
@zhanggbj
Copy link
Contributor Author

/retest pull-cluster-api-provider-vsphere-test-main

@k8s-ci-robot
Copy link
Contributor

@zhanggbj: The /retest command does not accept any targets.
The following commands are available to trigger required jobs:

  • /test pull-cluster-api-provider-vsphere-conformance-main
  • /test pull-cluster-api-provider-vsphere-e2e-full-main
  • /test pull-cluster-api-provider-vsphere-e2e-main
  • /test pull-cluster-api-provider-vsphere-test-integration-main
  • /test pull-cluster-api-provider-vsphere-test-main
  • /test pull-cluster-api-provider-vsphere-verify-main

The following commands are available to trigger optional jobs:

  • /test pull-cluster-api-provider-vsphere-apidiff-main

Use /test all to run the following jobs that were automatically triggered:

  • pull-cluster-api-provider-vsphere-apidiff-main
  • pull-cluster-api-provider-vsphere-e2e-main
  • pull-cluster-api-provider-vsphere-test-integration-main
  • pull-cluster-api-provider-vsphere-test-main
  • pull-cluster-api-provider-vsphere-verify-main

In response to this:

/retest pull-cluster-api-provider-vsphere-test-main

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Set up golang context when initiating controller manager and also pass it down
to VSphereCluster controller

Signed-off-by: Gong Zhang <[email protected]>
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Sep 12, 2023

@zhanggbj: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-provider-vsphere-apidiff-main 62877a6 link false /test pull-cluster-api-provider-vsphere-apidiff-main

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@zhanggbj
Copy link
Contributor Author

@sbueringer thanks for your review, it's ready for a second look.

@sbueringer
Copy link
Member

Thank you very much!!

/lgtm

/assign @chrischdi
for a final review

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 12, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: fa9cd0f600176d32edb2c2278fd99c2273f3ae1c

@chrischdi
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrischdi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 13, 2023
@chrischdi
Copy link
Member

Awesome work! Thanks @zhanggbj 🏆

@k8s-ci-robot k8s-ci-robot merged commit 2f2db52 into kubernetes-sigs:main Sep 13, 2023
10 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.9 milestone Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants